﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp5
{
    class DeliveryRobot : Robot
    {
        private string hours;

        public string Hours
        {
            get { return this.hours; }
            set { this.hours = value; }

        }
        public DeliveryRobot()
        { }
        public DeliveryRobot(string hours, string name) : base(name)

        {
            this.hours = hours;

        }

        //可以在CookRobot中添加一个代表菜的类型的字段，用枚举类型；在DeliveryRobot中添加一个代表连续工作时长的字段hours。
        //CookRobot和DeliveryRobot应实现具体的Working()方法。
        public override void Working()
        {
            Console.WriteLine("我是{0}，我工作{1}时", base.Name, this.hours);
        }
    }
}
